-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check host_maps and host_data in the GPU transformations #1701
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Tal Ben-Nun <[email protected]>
def _output_or_input_is_marked_host(self, state, entry_node): | ||
if (self.host_data is None or self.host_data == []) and (self.host_maps is None or self.host_maps == []): | ||
return False | ||
marked_accesses = [e.data.data for e in state.in_edges(entry_node) + state.out_edges(state.exit_node(entry_node)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't checking memlet paths and adding the src and destination data make more sense here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To clarify, I am considering issues similar to those identified in #1708
for state in sdfg.nodes(): | ||
for node in state.nodes(): | ||
if isinstance(node, nodes.EntryNode) and node.guid in self.host_maps: | ||
accesses = {e.data.data for e in state.in_edges(node) + state.out_edges(state.exit_node(node)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above.
@@ -312,11 +338,13 @@ def apply(self, _, sdfg: sd.SDFG): | |||
for node in state.nodes(): | |||
if sdict[node] is None: | |||
if isinstance(node, (nodes.LibraryNode, nodes.NestedSDFG)): | |||
node.schedule = dtypes.ScheduleType.GPU_Default | |||
gpu_nodes.add((state, node)) | |||
if node.guid not in self.host_maps and not self._output_or_input_is_marked_host(state, node): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the node is a LibraryNode or NestedSDFG, why would its ID be in host_maps
? A documentation line clarifying that host_maps
can also be used for the above SDFG elements suffices.
No description provided.